package design_1_factory.demo2;

import design_1_factory.demo2.factory.BendFactory;
import design_1_factory.demo2.server.impl.AServiceImpl;
import design_1_factory.demo2.server.impl.BServiceImpl;

/**
 * 调用简单工厂方法demo
 *
 * <p>
 * 使用场景：
 * </P>o
 *
 * @author wangsong
 * @email 1720696548@qq.com
 * @date 2022/1/18 11:41
 */
public class BendFactoryDemo {

	public static void main(String[] args) {
		BendFactory bendFactory = new BendFactory();
        AServiceImpl aServiceImpl = (AServiceImpl)bendFactory.getBean("AServiceImpl");
        System.out.println(aServiceImpl.findId());

		BServiceImpl bServiceImpl = (BServiceImpl)bendFactory.getBean("BServiceImpl");
		System.out.println(bServiceImpl);
    }
}